Vector
	parent_type = /Matrix
	var
		dimensions

	New(...)
		src.dimensions = args.len
		. = ..(src.dimensions, 1)
		src.Populate(arglist(args))

	proc
		GetComponent(c)
			return src.GetValue(c, 1)

		SetComponent(c, value)
			src.SetValue(c, 1, value)

		Length()
			return sqrt(src.LengthSquared())

		LengthSquared()
			. = 0
			for(var/c = 1 to dimensions)
				var/x = src.GetComponent(c)
				. += x*x

Vector2
	parent_type = /Vector
	dimensions = 2

	var
		x
		y

	New(x=0, y=0)
		src.x = x
		src.y = y

	// A bit of a hack so that the matrix stays in sync with the
	// x and y vars.
	GetValue(row, col)
		if(row == 1 && col == 1)
			return src.x
		else if(row == 2 && col == 1)
			return src.y
		else
			return ..()

	SetValue(row, col, val)
		if(row == 1 && col == 1)
			src.x = val
		else if(row == 2 && col == 1)
			src.y = val
		else
			return ..()